package com.molichuxing.services.infrastructure.service.impl;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.molichuxing.services.infrastructure.bean.GuarantorBean;
import com.molichuxing.services.infrastructure.dao.GuarantorMapper;
import com.molichuxing.services.infrastructure.dto.response.GuarantorDto;
import com.molichuxing.services.infrastructure.service.GuarantorService;
/**
 * 
 * @author liyg
 * 担保人服务实现类
 * 2019-11-06
 * 
 */
@Service("guarantorService")
public class GuarantorServiceImpl implements GuarantorService{

	@Autowired
	private GuarantorMapper guarantorMapper;
	
	@Override
	public GuarantorDto getByIdNumber(String idNumber) {
		
		GuarantorBean bean = guarantorMapper.getByIdNumber(idNumber);
		if(null == bean) {
			return null;
		}
		GuarantorDto dto =new GuarantorDto();
		BeanUtils.copyProperties(bean, dto);
		return dto;
	}
}
